<template>

    <home-pannel title="热门品牌" sub-title="国际经典 品质保障">
    <template #right>
        <a class="iconfont icon-angle-left prev" href="javascript:;" data-v-c2737746=""></a>
        <a class="disabled iconfont icon-angle-right next" href="javascript:;" data-v-c2737746=""></a>
    </template>
  <template #main>
    <ul class="brand-list">
      <li v-for="item in Brand" :key="item.id">
        <img  v-img-lazy="item.picture" alt="">
      </li>
    </ul>
  </template>
    </home-pannel>

</template>

<script>
import { findBrand } from '@/api/home'
import homePannel from './home-pannel.vue'
import { ref } from 'vue'
export default {
  components: {
    homePannel
  },
  setup () {
    const Brand = ref([])
    async function getBrand () {
      const res = await findBrand()
      // console.log(res.data.result)
      // Brand.value = res.data.result.slice(0, 5)
      Brand.value = res.data.result.slice(0, 5)
    }
    getBrand()
    return { Brand }
  }
}
</script>

<style scoped lang="less">
.brand-list{
  display: flex;
  li {
    flex:1 ;
    padding: 10px;
  }
}
.iconfont[data-v-c2737746] {
    width: 20px;
    height: 20px;
    background: #ccc;
    color: #fff;
    display: inline-block;
    text-align: center;
    margin-left: 5px;
    background: #27ba9b;
}
</style>
